package com.woniuxy.woniuticket.pojo;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import lombok.ToString;
import java.math.BigDecimal;
/*链接已存在的ES索引
* indexname：名
* type：类型
* shards：分片
* replicas：副本
* 最后一次改于：2019.6.11 Evan*/
@Document(indexName = "woniuticket",type = "movies",shards = 1,replicas = 0)

@ToString
public class CinemaMovies {
    /*表示ID*/
    @Id
    private Integer id;

    /*分词字段名，使用IK分词器，以下如此*/
    @Field(type = FieldType.Text,searchAnalyzer = "ik_max_word",index = true)
    private String movename;

    @Field(type = FieldType.Text,searchAnalyzer = "ik_max_word",index = true)
    private String mainactor;

    private String director;

    private Integer duration;

    private String description;

    private String img;

    private String vediosrc;

    private Integer flag;

    private BigDecimal movieprice;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getMovename() {
        return movename;
    }

    public void setMovename(String movename) {
        this.movename = movename;
    }

    public String getMainactor() {
        return mainactor;
    }

    public void setMainactor(String mainactor) {
        this.mainactor = mainactor;
    }

    public String getDirector() {
        return director;
    }

    public void setDirector(String director) {
        this.director = director;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getVediosrc() {
        return vediosrc;
    }

    public void setVediosrc(String vediosrc) {
        this.vediosrc = vediosrc;
    }

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    public BigDecimal getMovieprice() {
        return movieprice;
    }

    public void setMovieprice(BigDecimal movieprice) {
        this.movieprice = movieprice;
    }

    public CinemaMovies(Integer id, String movename, String mainactor, String director, Integer duration, String description, String img, String vediosrc, Integer flag, BigDecimal movieprice) {
        this.id = id;
        this.movename = movename;
        this.mainactor = mainactor;
        this.director = director;
        this.duration = duration;
        this.description = description;
        this.img = img;
        this.vediosrc = vediosrc;
        this.flag = flag;
        this.movieprice = movieprice;
    }
    public CinemaMovies(){

    }

    @Override
    public String toString() {
        return "CinemaMovies{" +
                "id=" + id +
                ", movename='" + movename + '\'' +
                ", mainactor='" + mainactor + '\'' +
                ", director='" + director + '\'' +
                ", duration=" + duration +
                ", description='" + description + '\'' +
                ", img='" + img + '\'' +
                ", vediosrc='" + vediosrc + '\'' +
                ", flag=" + flag +
                ", movieprice=" + movieprice +
                '}';
    }
}